package com.daka.service.impl;

import com.daka.dao.HatAreaDao;
import com.daka.dao.HatCityDao;
import com.daka.dao.HatProvinceDao;
import com.daka.entity.HatArea;
import com.daka.entity.HatCity;
import com.daka.entity.HatProvince;
import com.daka.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by yangx
 * CreateTime: 2016/9/21 14:38
 */

@Service("areaService")
@Transactional
public class AreaServiceImpl implements AreaService {

    @Autowired
    private HatProvinceDao hatProvinceDao;
    @Autowired
    private HatCityDao hatCityDao;
    @Autowired
    private HatAreaDao hatAreaDao;


    @Override
    public List<HatProvince> selectAll() {
        return hatProvinceDao.selectAll();
    }

    @Override
    public List<HatCity> selectByProvince(String father) {
        return hatCityDao.selectByProvince(father);
    }

    @Override
    public List<HatArea> selectByCity(String father) {
        return hatAreaDao.selectByCity(father);
    }
}
